#include "heritage.h"

BaseTime::BaseTime(){};

BaseTime::BaseTime(int hour, int minute, int second):hour_(hour),minute_(minute),second_(second){};

BaseTime::~BaseTime(){};

inline void BaseTime::SetHour(int hour){
    hour_ = hour;
}

inline void BaseTime::SetMinute(int minute){
    minute_ = minute;
}

inline void BaseTime::SetSecond(int second){
    second_ = second;
}

inline int BaseTime::GetHours(){
    return hour_;
}

inline int BaseTime::GetMinutes(){
    return minute_;
}

inline int BaseTime::GetSeconds(){
    return second_;
}

void BaseTime::ShowTime(){
    std::cout << "time : " << hour_ << ":" << minute_ << ":" << second_ << std::endl;
}

Time::Time(){};

Time::Time(int hour, int minute, int second, TimeZone zone) : BaseTime(hour, minute, second), zone_(zone){};

Time::~Time(){};

void Time::SetZone(TimeZone zone){
    zone_ = zone;
}

inline TimeZone Time::GetZone(){
    return zone_;
}

void Time::ShowTime(){
    std::cout << "time zone : " << int(zone_) << std::endl;
    std::cout << "time : " << hour_ << ":" << minute_ << ":" << second_ << std::endl;
}

void Time::ShowTimeZone(){
    std::cout << "time zone : " << int(zone_) << std::endl;
}
